<template>
	<!-- 商品展示模块 -->
	<view class="videoBox">
		<block v-for="(item,index) in goodsList" :key="index">
			<view class="goodsBox" @click="toDetail(item)">
				<view class="imageBox">
					<image :src="item.image" mode="widthFix" style="width: 100%;height: 336rpx;"></image>
					<view class="tagBox" v-if="item.tag">{{item.tag}}</view>
				</view>
			</view>
		</block>
	</view>
</template>

<script>
	import { isLogin } from "../../mixins/isLogin.js"
	import { isUpdateNew } from "../../mixins/isUpdateNew.js"
	export default {
		name:"my-goods",
		mixins:[isLogin,isUpdateNew],
		data() {
			return {
				baseUrl:this.$baseUrl,
			};
		},
		props:{
			goodsList:{
				type:Array,
				default:[]
			}
		},
		methods:{
			toDetail(item){
				uni.navigateTo({
					url:"/pagesIndex/goods/detail?id="+item.id
				})
			}
		}
	}
</script>

<style scoped lang="scss">
.videoBox{
	// display: flex;
	// justify-content: space-between;
	// align-items: center;
	// flex-wrap: wrap;
	.goodsBox{
		font-size: 0%;
		border-radius: 16rpx;
		overflow: hidden;
		margin-bottom: 16rpx;
		.imageBox{
			font-size: 0%;
			border-radius: 16rpx;
			overflow: hidden;
			position: relative;
			.tagBox{
				font-weight: 600;
				font-size: 24rpx;
				color: #fff;
				background: linear-gradient( 90deg, #FAB335 0%, #FF7F00 100%);
				border-radius: 16rpx 0 16rpx 0;
				padding: 4rpx 12rpx;
				position: absolute;
				top: 0%;
				left: 0%;
			}
		}
		.goodsInfoBox{
			padding: 16rpx 0;
			.goodsName{
				font-weight: 700;
				font-size: 28rpx;
				color: #16202B;
			}
		}
	}
}
</style>